package controller;

import java.net.URL;
import java.util.ResourceBundle;

import inter.Main;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Button;
import javafx.scene.control.Label;

public class Chatting implements Initializable {

	@FXML
	private Button exit;

	@FXML
	private Label Name;

	@FXML
	private Button object;

	@FXML
	void Esc(ActionEvent event) throws Exception {

		Main main = new Main();
		main.start(Main.stage);
		//
	}

	@FXML
	void Talk(ActionEvent event) throws Exception {

		Main.replaceSceneContent("/scene/Talking.fxml");
	}

	@Override
	public void initialize(URL location, ResourceBundle resources) {
		// TODO Auto-generated method stub

		// Main.pep.textProperty().addListener((obs, oldText, newText) ->
		// Name.setText(newText));
		Name.setText(Main.pep.getText());
		object.setText(Main.pep.contact);
	}

}
